package com.xuanwei.dao.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author mjy
 * @since 2019-07-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class XwOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 收货人
     */
    @TableField("receive_name")
    private String receiveName;

    /**
     * 收货人电话
     */
    @TableField("receive_phone")
    private String receivePhone;

    /**
     * 省
     */
    @TableField("province")
    private String province;

    @TableField("city")
    private String city;

    /**
     * 县/区
     */
    @TableField("area")
    private String area;

    /**
     * 详细地址
     */
    @TableField("address")
    private String address;

    /**
     * 购物车总金额
     */
    @TableField("total_amount")
    private BigDecimal totalAmount;

    /**
     * 运费
     */
    @TableField("freight")
    private BigDecimal freight;

    /**
     * 优惠价格
     */
    @TableField("preferential_amount")
    private BigDecimal preferentialAmount;

    /**
     * 实际支付金额
     */
    @TableField("actual_amount")
    private BigDecimal actualAmount;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 创建时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 状态0未支付1已支付2已发货3已收货4已评价5售后6已关闭7
     */
    @TableField("status")
    private Integer status;

    /**
     * 支付时间
     */
    @TableField("pay_time")
    private LocalDateTime payTime;

    /**
     * 发货时间
     */
    @TableField("send_time")
    private LocalDateTime sendTime;

    /**
     * 收货时间
     */
    @TableField("receive_time")
    private LocalDateTime receiveTime;

    /**
     * 评价时间
     */
    @TableField("success_time")
    private LocalDateTime successTime;

    /**
     * 关闭时间
     */
    @TableField("close_time")
    private LocalDateTime closeTime;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 用户删除标志0未删除1删除
     */
    @TableField("user_delete_flag")
    private Integer userDeleteFlag;

    /**
     * 0正常1删除
     */
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    /**
     * 支付需要
     */
    @TableField(exist = false)
    private String payBody;


}
